
DEFINITION MODULE Functions;

EXPORT QUALIFIED
   CardMin, IntMin, RealMin, CardMax, IntMax, RealMax, RightPad, LeftPad,
   ToSpaces, RightTrim, LeftTrim, LeftString, RightString, RepeatString,
   StringReplace, MidString, RealSign, Round, RecHi, RecLo;


PROCEDURE CardMin( a,b : CARDINAL) : CARDINAL;

PROCEDURE IntMin( a,b : INTEGER) : INTEGER;

PROCEDURE RealMin( a,b : REAL) : REAL;

PROCEDURE CardMax( a,b : CARDINAL) : CARDINAL;

PROCEDURE IntMax( a,b : INTEGER) : INTEGER;

PROCEDURE RealMax( a,b : REAL) : REAL;

PROCEDURE RightPad(VAR dest : ARRAY OF CHAR; source : ARRAY OF CHAR;
                   i : CARDINAL);

PROCEDURE LeftPad(VAR dest : ARRAY OF CHAR; source : ARRAY OF CHAR;
                   i : CARDINAL);

PROCEDURE ToSpaces(VAR dest : ARRAY OF CHAR; i : CARDINAL);

PROCEDURE RightTrim(VAR dest : ARRAY OF CHAR; source : ARRAY OF CHAR);

PROCEDURE LeftTrim(VAR dest : ARRAY OF CHAR; source : ARRAY OF CHAR);

PROCEDURE LeftString(VAR dest : ARRAY OF CHAR; source : ARRAY OF CHAR;
                     i : CARDINAL);

PROCEDURE RightString(VAR dest : ARRAY OF CHAR; source : ARRAY OF CHAR;
                     i : CARDINAL);

PROCEDURE RepeatString(VAR dest : ARRAY OF CHAR; ch : CHAR; i : CARDINAL);

PROCEDURE StringReplace(VAR dest : ARRAY OF CHAR; ch1,ch2 : CHAR);

PROCEDURE MidString(VAR dest : ARRAY OF CHAR; source : ARRAY OF CHAR;
                    beg,len : CARDINAL);

PROCEDURE RealSign(x : REAL) : REAL;

PROCEDURE Round( x : REAL) : REAL;

PROCEDURE RecHi( recno, filelen : CARDINAL) : CARDINAL;

PROCEDURE RecLo( recno, filelen : CARDINAL) : CARDINAL;


END Functions.
